#{extends 'head.html' /}
#{set title:'蓝莲花 | 首页' /}

<link rel="stylesheet" href="/public/stylesheets/alert.css" type="text/css"></link>
<script type="text/javascript" src="/public/javascripts/adu.alert.js"></script>
#{set mb:service.MemberService.ckLogin(session) /}
    <!-- content 开始-->
    <div class="cont">
    	<!-- 第一 -->
        <div class="con_a">
        	<div class="cn_a_1">
            	<div class="ca_1a"><img src="@{'/public/indexFile/images/images_17.gif'}"/></div>
                <div class="ca_1b">
                	
                	#{list bookTypes , as:"bookType"}
                	<div class="ca_1b_1">
                    	<div class="ca_bm1">
                        	<div class="cbm_a">${bookType.botName}</div>
                            <div class="cbm_b"><a href="/books.html?id=${bookType.id }">更多&gt;&gt;</a></div>
                        </div>
                        <div class="ca_bm2">
                        	<ul>
                        		#{list bookType.sTypes , as:"st"}
                            		<li><a href="/books.html?id=${st.id }">${st.botName}</a></li>
                                #{/list}
                            </ul>
                        </div>
                    </div>
                   #{/list} 
                    
                </div>
                <div class="ca_1c">
                	<div class="ca_1c_1"><a href="#">全部分类&gt;&gt;</a></div>
                </div>
            </div>
            <div class="cn_a_r">
            	<div class="cn_a_r1">
                	<div class="cr1_n"><select><option>书籍名字</option></select></div>
                    <div class="cr1_x"><input type="text"/></div>
                    <div class="cr1_v"><a href="#"><img src="@{'/public/indexFile/images/images_19.gif'}"/></a></div>
                    <div class="cr1_m">
                    	<ul>
                        	<li class="mvn">热门搜索：</li>
                            <li><a href="#">微微书香</a></li>
                            <li><a href="#">微微书香</a></li>
                            <li><a href="#">微微书香</a></li>
                            <li><a href="#">微微书香</a></li>
                        </ul>
                    </div>
                </div>
                <div class="cn_a_r2">
                	<div class="cr2_1" id="idContainer2">
                      <table id=idSlider2 border=0 cellSpacing=0 cellPadding=0>
                        <tbody>
                          <tr id="ta">
                          <!-- 
                            #{list hd?.adverts,as:'adsHd'}
                            <td class=td_f>
                            	<a href="${adsHd.advHref}" target="_blank"><img src="/public/indexFile/images/${adsHd.advDet}"/></a>
                            </td>
                          	#{/list}
                          	 -->
                          	<TD class=td_f><A href="#" target="_blank"><IMG src="/public/indexFile/images/scooll1.jpg"></A></TD>
							<TD class=td_f><A href="#" target="_blank"><IMG src="/public/indexFile/images/scooll2.jpg"></A></TD>
							<TD class=td_f><A href="#" target="_blank"><IMG src="/public/indexFile/images/scooll3.jpg"></A></TD>
							<TD class=td_f><A href="#" target="_blank"><IMG src="/public/indexFile/images/scooll4.jpg"></A></TD>
							<TD class=td_f><A href="#" target="_blank"><IMG src="/public/indexFile/images/scool5.jpg"></A></TD>
                          </tr>
                        </tbody>
                      </table>
                      <ul id="idNum" class="num" style="LEFT: 548px">
                      </ul>
                    <!--</DIV>-->
                    <SCRIPT>
						var forEach = function(array, callback, thisObject){
							if(array.forEach){
								array.forEach(callback, thisObject);
							}else{
								for (var i = 0, len = array.length; i < len; i++) { callback.call(thisObject, array[i], i, array); }
							}
						}
						var la = document.getElementById("ta").getElementsByTagName("td").length;
						var st = new SlideTrans("idContainer2", "idSlider2", la, { Vertical: false });
						
						var nums = [];
						//插入数字
						for(var i = 0, n = st._count - 1; i <= n;){
							(nums[i] = d$("idNum").appendChild(document.createElement("li"))).innerHTML = ++i;
						}
						
						
						forEach(nums, function(o, i){
							o.onmouseover = function(){ o.className = "on"; st.Auto = false; st.Run(i); }
							o.onmouseout = function(){ o.className = ""; st.Auto = true; st.Run(); }
						})
						
						//设置按钮样式
						st.onStart = function(){
							forEach(nums, function(o, i){ o.className = st.Index == i ? "on" : ""; })
						}
						st.Run();
						num(la);
						function num (la){
							
							var n = la - 1;
							var lm = 548;
							var lb = n * 21;
							var m = lm - lb;
							document.getElementById("idNum").style.left = m + "px";
						}
						
						
						
						function clearText(id){
						document.getElementById(id).value="";
						}
					</SCRIPT>
                    </div>
                    <div class="cr2_2">
                    	<div class="cr2_2a">
                        	<div class="cr2_2a_1">
                            	<div class="cra_1">网站公告</div>
                                <div class="cra_2"><a href="#"><img src="@{'/public/indexFile/images/images_23.gif'}"/></a></div>
                            </div>
                            <div class="cr2_2a_2">
                            	<ul>
                            		#{list service.NewsService.findByCode("sy_wzgg",3),as:'newsF'}
                                		<li><a href="#">${newsF.newTit}</a></li>
                                    #{/list}
                                </ul>
                            </div>
                        </div>
                        <div class="cr2_2b">
                        	<div class="cr2_2b_1">爱心榜<span style="margin-left:100px;"><a style="color:#3572B1;" href="/controllers/IndexAction.donatebook">我要捐书</a></span></div>
                            <div class="cr2_2b_2">
                            	<ul>
                            		#{set i : 0/}
                            		#{list axb ,as:'ansb'}
                            			#{if i==0 }
                            				#{if mb != null }
	                                			<li><a href="/controllers/Members.mybook?uid=${service.MemberService.findmember(ansb.memname)?.id}">[${ansb.memname}]</a>捐赠数量:${ansb.booknum }</li>
	                                   		#{/if}
	                                   		#{else}
	                                   			<li><a href="/login.html">[${ansb.memname}]</a>捐赠数量:${ansb.booknum }</li>
	                                   		#{/else}
	                                    #{/if}
	                                    #{else}
	                                   		 #{if mb != null }
	                                    		<li class="bna${i}"><a href="/controllers/Members.mybook?uid=${service.MemberService.findmember(ansb.memname)?.id}">[${ansb.memname}]</a>捐赠数量:${ansb.booknum }</li>
	                                    	#{/if}
	                                   		#{else}
	                                   			<li class="bna${i}"><a href="/login.html">[${ansb.memname}]</a>捐赠数量:${ansb.booknum }</li>
	                                   		#{/else}
	                                    #{/else}
	                                    #{set i:i+1 /}
                                    #{/list}
                                </ul>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="cn_a_r3">
                	<div class="cnr_a">
                    	<div class="cnr_a1"><samp>热评读书</samp><samp class="cnr_sa">YUAPINGTUSHU</samp></div>
                        <div class="cnr_a2"><a href="#"><img src="@{'/public/indexFile/images/images_38.gif'}"/></a></div>
                    </div>
                    <div class="cnr_b">
                    	<ul>
                        	#{list hootPin ,as :"pin"}
                            <li>
                            	<div class="cna_1">
                            		<a href="/show_${pin.id}_book.html">
                            			<img width="68" src="${pin.simage }"/></a></div>
                                <div class="cna_2">
                                	<div class="ca_2_1"><a href="/show_${pin.id}_book.html" title="${pin.booName }">${pin.booName }</a></div>
                                    <div class="ca_2_2">${pin.booDet}</div>
                                </div>
                            </li>
                            #{/list}
                        </ul>
                    </div>
                </div>
            </div>
        </div>
        
        <!-- 第二 -->
        <div class="con_b">
        	<div class="cn_b1">
            	<div class="cnb_a">
                	<div class="cnb_a1">
                    	<div class="cn_a1_1">收藏榜</div>
                        <div class="cn_a1_2"><a href="#"><img src="@{'/public/indexFile/images/images_41.gif'}"/></a></div>
                    </div>
                    <div class="cnb_a2">
                    	<ul id="vc">
                    		#{set i:1 /}
                            #{list enshtBook ,as :"ens"}
	                            	#{if i == 1}
	                            	<li class="ma" onmouseover="mend(${i})" id="n${i}">
		                            	<div class="cv1" id="ma${i}">${i}</div>
		                                <div style="display:none" class="cn_ba_2" id="mb${i}">[${ens.bookTypeIds}]</div>
		                                <div class="cv3" id="mc${i}"><a href="/show_${ens.id }_book.html">&lt;&lt;${util.Util.sub(ens.booName, 6)}&gt;&gt;</a></div>
	                            	#{/if}
									#{else}
									<li class="mv" onmouseover="mend(${i})" id="n${i}">
	                            		<div class="cn_ba_1" id="ma${i}">${i}</div>
		                                <div class="cn_ba_2" id="mb${i}" style="display:block;">[${ens.bookTypeIds}]</div>
		                                <div class="cn_ba_3" id="mc${i}"><a href="/show_${ens.id }_book.html">&lt;&lt;${util.Util.sub(ens.booName, 6)}&gt;&gt;</a></div>
	                            	#{/else}
	                            </li>
                            	#{set i:i+1 /}
                            #{/list}
                        </ul>
                    </div>
                </div>
                <div class="cnb_b">
                	<div class="cnb_a1">
                    	<div class="cn_a1_1">借阅榜</div>
                        <div class="cn_a1_2"><a href="#"><img src="@{'/public/indexFile/images/images_41.gif'}"/></a></div>
                    </div>
                    <div class="cnb_a2 cnb_m">
                    	<ul id="vn">
                        	#{set i:1 /}
                            #{list brooBook ,as :"ens"}
	                            	#{if i == 1}
                        			<li id="v${i}" class="ma" onmouseover="menv(${i})">
		                            	<div class="cv1" id="va${i}">${i}</div>
		                                <div class="cn_ba_2" id="vb${i}" style="display:none;">[修真]</div>
		                                <div class="cv3" id="vc${i}"><a href="/show_${ens.id }_book.html">&lt;&lt;${util.Util.sub(ens.booName, 6)}&gt;&gt;</a></div>
	                            	#{/if}
									#{else}
									<li id="v${i}" class="mv" onmouseover="menv(${i})">
		                            	<div class="cn_ba_1 cn_ba_x" id="va${i}">${i}</div>
		                                <div class="cn_ba_2" id="vb${i}" style="display:block;">[修真]</div>
		                                <div class="cn_ba_3" id="vc${i}"><a href="/show_${ens.id }_book.html">&lt;&lt;${util.Util.sub(ens.booName, 6)}&gt;&gt;</a></div>
	                            	#{/else}
	                            </li>
                            	#{set i:i+1 /}
                            #{/list}
                        </ul>
                    </div>
                </div>
            </div>
            <div class="cn_b2">
            	<div class="cnb2_1">
                	<div class="cnr_a1"><samp>网站推荐</samp><samp class="cnr_sa">WANGZHANTUULAN</samp></div>
                    <div class="cnr_a2"><a href="#"><img src="@{'/public/indexFile/images/images_38.gif'}"/></a></div>
                </div>
                <div class="cnb2_2">
                	<div class="cb2_a">
                    	<div class="cb2_a1">
                        	<div class="ca_l">扎根图书</div>
                            <div class="ca_r"><a href="#">更多&gt;&gt;</a></div>
                        </div>
                        <div class="cb2_a2">
                        	<ul>
                        		#{list gytszg,as:"bosf"}
                            	<li onmousemove="cbvn(1,1)" onmouseout="cbvm(1,1)" id="c1">
                                	<div class="cb_im"><a href="/show_1_book.html"><img src="@{'/public/indexFile/images/images_45.gif'}"/></a></div>
                                    <div class="cb_vn"><a href="/show_1_book.html">天机</a></div>
                                </li>
                                <li onmousemove="cbvn(2,1)" onmouseout="cbvm(2,1)" id="c2">
                                	<div class="cb_im"><a href="#"><img src="@{'/public/indexFile/images/images_47.gif'}"/></a></div>
                                    <div class="cb_vn"><a href="#">天机</a></div>
                                </li>
                                <li onmousemove="cbvn(3,1)" onmouseout="cbvm(3,1)" id="c3">
                                	<div class="cb_im"><a href="#"><img src="@{'/public/indexFile/images/images_48.gif'}"/></a></div>
                                    <div class="cb_vn"><a href="#">天机</a></div>
                                </li>
                                <li onmousemove="cbvn(4,1)" onmouseout="cbvm(4,1)" id="c4">
                                	<div class="cb_im"><a href="#"><img src="@{'/public/indexFile/images/images_49.gif'}"/></a></div>
                                    <div class="cb_vn"><a href="#">天机</a></div>
                                </li>
                                <li onmousemove="cbvn(5,1)" onmouseout="cbvm(5,1)" id="c5">
                                	<div class="cb_im"><a href="#"><img src="@{'/public/indexFile/images/images_50.gif'}"/></a></div>
                                    <div class="cb_vn"><a href="#">天机</a></div>
                                </li>
                                #{/list}
                            </ul>
                        </div>
                    </div>
                    
                    <div class="cb2_a">
                    	<div class="cb2_a1">
                        	<div class="ca_l">国学经典</div>
                            <div class="ca_r"><a href="#">更多&gt;&gt;</a></div>
                        </div>
                        <div class="cb2_a2">
                        	<ul>
                        		#{list gysejd , as : "jd"}
                            	<li onmousemove="cbvn(1,2)" onmouseout="cbvm(1,2)" id="k1">
                                	<div class="cb_im"><a href="#"><img src="@{'/public/indexFile/images/images_45.gif'}"/></a></div>
                                    <div class="cb_vn"><a href="#">天机</a></div>
                                </li>
                                <li onmousemove="cbvn(2,2)" onmouseout="cbvm(2,2)" id="k2">
                                	<div class="cb_im"><a href="#"><img src="@{'/public/indexFile/images/images_47.gif'}"/></a></div>
                                    <div class="cb_vn"><a href="#">天机</a></div>
                                </li>
                                <li onmousemove="cbvn(3,2)" onmouseout="cbvm(3,2)" id="k3">
                                	<div class="cb_im"><a href="#"><img src="@{'/public/indexFile/images/images_48.gif'}"/></a></div>
                                    <div class="cb_vn"><a href="#">天机</a></div>
                                </li>
                                <li onmousemove="cbvn(4,2)" onmouseout="cbvm(4,2)" id="k4">
                                	<div class="cb_im"><a href="#"><img src="@{'/public/indexFile/images/images_49.gif'}"/></a></div>
                                    <div class="cb_vn"><a href="#">天机</a></div>
                                </li>
                                <li onmousemove="cbvn(5,2)" onmouseout="cbvm(5,2)" id="k5">
                                	<div class="cb_im"><a href="#"><img src="@{'/public/indexFile/images/images_50.gif'}"/></a></div>
                                    <div class="cb_vn"><a href="#">天机</a></div>
                                </li>
                                #{/list}
                            </ul>
                        </div>
                    </div>
                    
                    <div class="cb2_a">
                    	<div class="cb2_a1">
                        	<div class="ca_l">公益图书</div>
                            <div class="ca_r"><a href="#">更多&gt;&gt;</a></div>
                        </div>
                        <div class="cb2_a2">
                        	<ul>
                        		#{list gytses , as:"bosf2"}
                            	<li onmousemove="cbvn(1,3)" onmouseout="cbvm(1,3)" id="s1" class="lm">
                                	<div class="cb_im"><a href="#"><img src="@{'/public/indexFile/images/images_45.gif'}"/></a></div>
                                    <div class="cb_vn"><a href="#">天机</a></div>
                                </li>
                                <li onmousemove="cbvn(2,3)" onmouseout="cbvm(2,3)" id="s2">
                                	<div class="cb_im"><a href="#"><img src="@{'/public/indexFile/images/images_47.gif'}"/></a></div>
                                    <div class="cb_vn"><a href="#">天机</a></div>
                                </li>
                                <li onmousemove="cbvn(3,3)" onmouseout="cbvm(3,3)" id="s3">
                                	<div class="cb_im"><a href="#"><img src="@{'/public/indexFile/images/images_48.gif'}"/></a></div>
                                    <div class="cb_vn"><a href="#">天机</a></div>
                                </li>
                                <li onmousemove="cbvn(4,3)" onmouseout="cbvm(4,3)" id="s4">
                                	<div class="cb_im"><a href="#"><img src="@{'/public/indexFile/images/images_49.gif'}"/></a></div>
                                    <div class="cb_vn"><a href="#">天机</a></div>
                                </li>
                                <li onmousemove="cbvn(5,3)" onmouseout="cbvm(5,3)" id="s5">
                                	<div class="cb_im"><a href="#"><img src="@{'/public/indexFile/images/images_50.gif'}"/></a></div>
                                    <div class="cb_vn"><a href="#">天机</a></div>
                                </li>
                                #{/list}
                            </ul>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        
        <!-- 第三 -->
        <div class="con_c">
        	<div class="con_c1">
            	<div class="cn_c1_a">
                	<div class="cn_c1_a1">
                    	<div class="ca_m_1">名家推荐</div>
                    </div>
                    <div class="cn_c1_a2">
                    	<ul>
                        	#{list service.NewsService.findByCode("mjtj",3),as:'newsF'}
                            	<li>
	                            	<div class="cn_mac"><a href="#"><img src="@{'/public/indexFile/images/images_57.gif'}"/></a></div>
	                                <div class="cn_max">
	                                	<samp>姓名</samp>:张雪林<br />生于1955年5月，四川南充人教授，博士硕士生.... <a href="#">详细>></a>
	                                </div>
	                            </li>
                            #{/list}
                        </ul>
                    </div>
                </div>
                <div class="cn_c1_b">
                	<div class="cn_m_b1"><!-- 新浪微博 -->&nbsp;</div>
                    <div class="cn_m_b2"></div>
                </div>
                <form action="@{createLeas()}" method="post" name="leaAddF" >
	                <div class="cn_c1_c">
	                	<div class="cn_c1_c1">对于我们的这个网站您有什么想法都欢迎反馈给我们。谢谢！</div>
	                    <div class="cn_c1_c2">
	                    <textarea name="lemDet" id="lemDet" >
	                    </textarea>
	                    </div>
	                    <div class="cn_c1_c3">
	                    	<div class="cn3_a"><input id="Lembut" type="image" onclick="this.form.submit()" src="@{'/public/indexFile/images/images_61.gif'}"/></div>
	                        <div class="cn3_b"><input type="image" onclick="this.form.reset()" src="@{'/public/indexFile/images/images_62.gif'}"/></div>
	                    </div>
	                </div>
	                #{if flash.success}
	                	#{if mb == null}
	                		<script type="text/javascript">
	                			aduAlert("您还没有登陆！","提示",function(){
	                				window.location.href = "/login.html";
	                			});
	                		</script>
	                	#{/if}
	                	#{else}
			               	<script type="text/javascript">
								aduAlert('<font>${flash.success}</font>',"提示",function(e){
									$("#Lembut").focus();
								});
					       	</script>
				       	#{/else}
			       	#{/if}
                </form>
                
            </div>
            <div class="con_c2">
            	<div class="cn_c2_1">
            		#{list ads?.adverts,as:'ads2'}
            			<a href="${ads2.advHref }"><img src="/public/indexFile/images/${ads2.advDet}"/></a>
            		#{/list}
            	</div>
                <div class="cn_c2_2">
                	<div class="cnb2_1">
                        <div class="cnr_a1"><samp>新书上架</samp><samp class="cnr_sa">XINSHUSANGJIA</samp></div>
                        <div class="cnr_a2"><a href="#">
                        	<img src="@{'/public/indexFile/images/images_38.gif'}"/></a></div>
                    </div>
                    <div class="cnc2_b">
                    	<ul>
                        	#{list newBook , as : 'newb'}
                        	<li>
                            	<div class="cnc2_b_1"><a href="/show_${newb.id}_book.html">
                            		<img width="102" src="${newb.simage }"/></a></div>
                                <div class="cnc2_b_2"><a href="/show_${newb.id}_book.html">${util.Util.sub(newb.booName, 8)}</a></div>
                            </li>
                            #{/list}
                        </ul>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!-- content 结束-->
	    
</body>
</html>
